<ul class="breadcrumb">
  <li><a ui-sref="admin.shows">Shows</a></li>
  <li class="active">{{show.name}}</li>
</ul>




<div class="row">
  <div class="col-md-8">

    <div class="row">

      <div class="col-md-11">
        <h1>
          {{show.name}}

          <div class="spinner" ng-show="loading">
            <div class="bounce1"></div>
            <div class="bounce2"></div>
            <div class="bounce3"></div>
          </div>
        </h1>
      </div>

      <div class="col-md-1">
        <div class="btn-group pull-right">
            <span uib-dropdown on-toggle="toggled(open)">
              <i class="ion-ios-settings icon-xl" uib-dropdown-toggle></i>
              <ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="simple-dropdown">
                <li><a ng-click="openShowModal()">Edit info</a></li>
                <li><a ng-click="deleteShow()">Delete TV-Show</a></li>
                <li><a ng-click="addToCurrentNotification()">Add to Email-Notification</a></li>
                <li><a ng-click="highlightOnDashboard()">Highlight on Dashboard</a></li>
              </ul>
            </span>
        </div>
      </div>
    </div>

    <hr>

    <div class="row">
      <div class="col-sm-2">
        <label>Release Date</label>
        <p class="data-display">{{show.first_air_date}}</p>
        <p ng-show="!show.first_air_date" class="data-display fade-50">-</p>
      </div>
      <div class="col-sm-2">
        <label>IMDB Link</label>
        <p class="data-display" ng-if="show.imdb_id"><a href="http://www.imdb.com/title/{{show.imdb_id}}">{{show.name}}</a></p>
        <p ng-show="!show.imdb_id" class="data-display fade-50">-</p>
      </div>
      <div ng-show="show.vote_average" class="col-sm-2">
        <label>Rating</label>
        <p class="data-display">{{show.vote_average}}/10</p>
      </div>
      <div ng-show="show.vote_count"class="col-sm-2">
        <label>Rating Count</label>
        <p class="data-display">{{show.vote_count}}</p>
      </div>
    </div>

    <br/>


    <div class="row">
      <div class="col-sm-12">
        <label>Overview</label>
        <p class="data-display">{{show.overview}}</p>
        <p ng-show="!show.overview" class="data-display fade-50">No overview added yet</p>
      </div>
    </div>

    <label>Genre</label>
    <ul class="genre-list">
      <li class="genre-tag interactive" ng-repeat="genre in show.genre" ui-sref="dash({genreId: genre.id})">
        {{genre.name}}
      </li>
    </ul>
    <p ng-show="!show.genre.length" class="data-display fade-50">No genre added yet</p>
  </div>


  <div class="col-sm-4">
    <div ng-if="!show.manualInput">
      <img ng-show="show.poster_path" ng-src="https://image.tmdb.org/t/p/w500/{{show.poster_path}}"/>
      <img ng-show="!show.poster_path" ng-src="{{basePath}}assets/poster-not-found.png"/>
    </div>

    <div ng-if="show.manualInput">
      <img ng-show="show.poster_image_src" ng-src="{{show.poster_image_src}}"/>

      <div class="upload-poster" ng-class="{'update-poster': show.poster_image_src}" ng-model="manualPoster" class="btn btn-primary btn-block btn-lg"
           ngf-change="uploadPoster($files)" ngf-select ngf-drop ngf-drag-over-class="dragover">
        <span class="main-text">Upload Poster</span>
        <span class="size-info">300x450 px</span>
        <span ng-show="imageUpload.percentage">{{imageUpload.percentage}}%</span>
      </div>
    </div>
  </div>
</div>


<hr/>
<br/><br/>


<div class="spinner" ng-show="showLoading">
  <div class="bounce1"></div>
  <div class="bounce2"></div>
  <div class="bounce3"></div>
</div>

<div ng-show="!showLoading">

  <button class="btn btn-primary" ng-click="addNewEpisode()">Add New Episode Manually</button>
  <button class="btn btn-primary" ng-click="fetchEpisodes()" ng-if="!show.manualInput" ng-show="hasMovieDBKey">Fetch Episodes</button>

  <div ng-if="!seasons" class="no-episodes-yet">No Episodes yet</div>

  <div ng-if="seasons">
    <hr>

    <div class="season-picker-list">
      <span class="season-picker-item" ng-class="{'active': currentSeason == season}" ng-click="setCurrentSeason(season)"
            ng-repeat="season in seasons | orderBy:number">
        Season {{season}}
      </span>
    </div>

    <div class="season-wrapper">
      <div>
        <button ng-click="refetchSeason(currentSeason)" ng-show="newEpisodesForSeason.count > 0" class="btn btn-success btn-xs">
          {{newEpisodesForSeason.count}} new Episodes For this Season. Re-fetch now</button>
        <button ng-click="deleteSeason(currentSeason)" class="btn btn-danger btn-xs">Delete Season</button>
      </div>
      <div class="media-list">
        <admin-episode episode-id="{{episode.id}}" episode="episode" ng-repeat="episode in listEpisodesForSeason(currentSeason) | orderBy:'episode_number'" ></admin-episode>
      </div>
    </div>
  </div>
</div>

<br/>
<br/>
<br/>


